package model;
/*
 * The AuctionCentralEmployee class.
 * @author Abdiel Cabrera
 * 
 * This class inherit all fields, getters and setters from its parent
 * class, such as name, userName, password, etc...
 * 
 * Fields added in addition to the parent class: Employee#
 */

/**
 * AuctionCentralEmployee class.
 * 
 * @author Abdiel Cabrera.
 * @version 1.0
 * @date Winter 2014
 */
public class AuctionCentralEmployee extends User{
	
	// accessLevel: 2- Auction Central Employee
	/** The level of this user */
	public static final int MY_LEVEL = 2;
	
	/** The employee bond number. */
	private String my_bond_number;
	
	/** Enum user type */
	private UserTypeEnum my_user_type = UserTypeEnum.UT_ACEMPLOYEE;

	/** 
	 * Construct a AuctionCentralEmployee object. 
	 *
	 * @pre the_first_name != null
	 * @pre the_last_name != null
	 * @pre the_userName != null
	 * @pre the_password != null
	 * @pre the_phone != null
	 * @pre the_address != null
	 * @pre the_email != null
	 * @pre the_bond_number != null
	 * 
	 * @param the_first_name The first name
	 * @param the_last_name The last name
	 * @param the_userName The user name
	 * @param the_password The password
	 * @param the_phone The phone
	 * @param the_address The address
	 * @param the_email The e-mail
	 * @param the_bond_number The bond number
	 * */
	public AuctionCentralEmployee(String the_first_name,String the_last_name, String the_userName,
			String the_password, String the_phone, Address the_address,
			String the_email, String the_bond_number) {
		super(the_first_name, the_last_name, the_userName, the_password, the_phone, the_address, the_email,
				MY_LEVEL);
	}
	
	/**
	 * Returns the employee's bond number.
	 * 
	 * @return the employee's bond number.
	 */
	public String getBondNumber() {
		return my_bond_number;
	}
	
	/**
	 * Retrieves the employee's bond number.
	 * 
	 * @param the_bond_number
	 */
	public void setBondNumber(String the_bond_number){
		my_bond_number = the_bond_number;
	}
	
	/**
	 * Returns the user type.
	 * 
	 * @return the my_user_type
	 */
	public UserTypeEnum get_userType() {
		return my_user_type;
	}
	
	/**
	 * Returns a String representation of the Auction Central Employee object.
	 * 
	 * @return a String representation.
	 */
	public String toString() {
		String result;
		result = my_first_name + "~" + my_last_name + "~" + my_userName + "~" + my_password
				 + "~" + my_phone + "~addressObject~" + my_email + "~" + my_bond_number;
		return result;
	}
}
